import { createApp } from 'vue'
import './style.css'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router/index'

let instance: any = null
const render = () => {
    instance = createApp(App)
    instance.use(createPinia())
    instance.use(router)
    instance.mount('#app')
}
if (!window.__MICRO_WEB__) {
    render()
}
// 下面微前端框架进行控制

// 开始加载结构
export const bootStrap = () => {
    console.log('开始加载')
}
// 渲染成功
export const mount = () => {
    render()
    console.log('渲染成功')
}
// 卸载
export const unmount = () => {
    console.log('卸载', instance)
}